<script setup lang="ts">
import {checkRecycleType, classFilesApi} from "../operation/FileApi";
import {ref,onMounted} from "vue";
import FileShow from '../operation/common/FileShow.vue'

let data= ref<Array<checkRecycleType>>([])

const getData=async ()=>{

  await classFilesApi(3).then(res=>{
    if(res.code=='00000'){
      data.value=res.data;
    }
  })
}

onMounted(()=>{
  getData();
})

const update= ()=>{
  getData()
}
</script>

<template>
<!--  音频-->
  <div class="file_infos" >
    <div v-for="(item,index) in data" :key="index"  style="text-align: center">
      <FileShow :fileInfo="item" @updateData="update" />

    </div>

  </div>
</template>

<style scoped>
.file_infos{
  display: flex;
}
</style>